The present invention relates to an image processing system which uses a line sensor, and more specifically to an image processing system for processing an image signal fetched with use of a line sensor so as to detect a defect of the pattern of a printed circuit, thus examining the appearance of an object.
FIG. 4 is a block diagram showing an image processing system which uses a conventional line sensor, for processing an image signal fetched with use of the line sensor, in order to detect a defect of the pattern of a printed circuit, thus examining the appearance of an object.
That is, as shown in FIG. 4, an object 2 is placed on a conveying belt 1, and it is moved as driven by a conveying motor 3.
Further, an illumination device 4, an optical system 5 and a line sensor 6 are built as an integral unit in an X-Y stage 7.
When the object 2 is conveyed to a predetermined test position, the conveying motor 3 stops. When the object 2 reaches the test position, the X-Y stage 7 moves two dimensionally.
Thus, the line sensor 6 moves relative to the object 2, and the image signal within a predetermined test range is fetched in an image processing unit 8 of a main central processing unit (CPU) 9. Then, the image signal is processed by the image processing unit 8, and thus a defect on the surface of the object 2 is detected.
The above-described operation is controlled by the main CPU 9.
More specifically, the movement of the X-Y stage 7 is controlled by an X-Y stage controller 10 as being instructed by the main CPU 9.
Further, the timing for fetching an image by the line sensor 6 is controlled by a clock signal supplied from a line sensor clock generator 11.
Here, in connection with the relation between a clock signal supplied to the line sensor 6 and the movement speed of the X-Y stage 7, a size y per one pixel on a surface of an object 2 is expressed by:
y=mxxe2x80x83xe2x80x83(1)
where x represents a size of an image pick-up element of the line sensor 6 and m represents a magnification of the optical system 5.
On the other hand, the movement speed v of the X-Y stage is expressed by:
xe2x80x83v=y/Lxe2x80x83xe2x80x83(2)
where L represents a line rate (time) of the line sensor 6.
The line rate L of the line sensor 6 is expressed approximately by:
L=caxe2x80x83xe2x80x83(3)
where a represents the number of pixels of one line, and c represents the clock rate (time) of a pixel.
From the above formulas (1), (2) and (3), the movement speed v of the X-Y stage 7 is expressed by:
v=(mx)/(ca)xe2x80x83xe2x80x83(4).
From the formula (4), when the magnification of the optical system 5 does not change, the clock rate of a clock signal supplied to the line sensor 6, and the movement speed of the X-Y stage 7 are univocally determined.
Under the circumstance, the applicant of the present invention has found that it is necessary to change the movement speed of the X-Y stage 7 as well, when the clock rate of the clock signal supplied to the line sensor 6 is varied.
That is, the clock rate of the line sensor 6 has an influence on the transfer speed of the image signal to the image processing unit 8. When the image processing speed of the image processing unit 8 is low with respect to the transfer speed of the image signal, it is necessary to lower the clock rate of the line sensor 6 so that the transfer speed of the image signal to the image processing unit 8 is matched with the image processing speed of the image processing unit 8.
Here, as described above, the clock rate of the line sensor 6 and the movement speed of the X-Y stage 7 are univocally related, and therefore if the clock rate is changed, the movement speed of the X-Y stage 7 must be changed accordingly.
However, conventionally, even if the clock rate of the line sensor 6 is changed, the movement speed of the X-Y stage 7 has never been varied so as to satisfy the formula (4).
Therefore, in the case where the clock signal supplied to the line sensor 6 and the movement speed of the X-Y stage 7 do not satisfy the above-described relationship, an image reproduced from an image signal fetched by the line sensor 6 will become a distorted one as being expanded/compressed in the scanning direction, or a defocused one.
If the image processing is carried out on the basis of such an image, there may arise a problem of not being able to perform an accurate image processing, for example, the defect detection is excessively carried out or on the other hand, no defect detection is carried out.
As a solution to such a problem, the conventional technique sets the image transfer speed to a low level in advance in accordance with the image processing speed of the image processing unit 8; however this measure creates a new problem of a test time being prolonged.
The present invention has been proposed in consideration of the above-described problems of the conventional technique, and the object thereof is to provide an image processing system which uses a line sensor capable of achieving an optimal image fetching speed in accordance with the image processing performance (image processing speed) without having an image distorted or defocused.
In order to achieve the above-described object, according to an aspect of the present invention, there is provided:
(1) An image processing system characterized by comprising:
illumination means for illuminating a surface of an object to be examined;
a line sensor for picking up an image of the surface of the object;
an optical system for imaging the image of the surface of the object on the line sensor;
movement means for moving the illumination means and the optical system relative to the object;
image processing means for processing an image signal from the line sensor;
clock signal generating means capable of changing the clock rate of the clock signal supplied to the line sensor; and
controlling means for controlling the movement speed of the movement means and the clock rate of the liner sensor such as to satisfy a relational formula:
v=(mx)/(ca)
where
m: the magnification of the optical system
x: the size of an imaging element of the line sensor, and
a: the number of pixels on one line of the line sensor, thereby adjusting the image signal transfer speed of the line sensor to match the processing speed of the image processing means.
In the above-described invention (1), the movement speed of the movement means and the clock rate of the liner sensor are controlled such as to satisfy a relational formula:
v=(mx)/(ca)
where
m: the magnification of the optical system
x: the size of an imaging element of the line sensor, and
a: the number of pixels on one line of the line sensor, thereby adjusting the image signal transfer speed of the line sensor to match the processing speed of the image processing means. Thus, the image fetching speed can be optimized, and the distortion or defocusing of the image can be avoided.
According to another aspect of the present invention, there is provided an image processing system (2) according to the above (1), characterized in that:
the controlling means changes the clock rate (c) of the line sensor such as to satisfy a relational formula: v=(mx)/(ca) in accordance with a change in at least one of the movement speed (v) of the movement means and the magnification (m) of the optical system.
According to still another aspect of the present invention, there is provided an image processing system (3) according to the above (1), characterized in that:
the controlling means changes at least one of the movement speed (v) of the movement means and the magnification (m) of the optical system such as to satisfy a relational formula: v=(mx)/(ca) in accordance with a change in the clock rate (c) of the line sensor.
According to still another aspect of the present invention, there is provided an image processing system (4) according to the above (1), characterized in that:
the clock signal generating means is controlled by the main central processing unit (CPU) which includes the image processing means.
In the inventions of the above-described aspects, the clock rate of the liner sensor is controlled by the controlling means in relation to the processing speed of the image processing means or the movement speed of the movement means, and therefore the clock rate of the liner sensor can be optimized.
According to still another aspect of the present invention, there is provided an image processing system (5) according to the above (1), characterized in that:
the clock signal generating means is controlled by the controller of the movement means.
According to still another aspect of the present invention, there is provided an image processing system (6) according to any one of the above (1), (4) and (5), characterized in that:
parallel input ports of a plurality of bits, which correspond to parallel output ports of a plurality of bits, are assigned to the clock signal generating means, and
a line sensor clock generator is used as means for supplying a clock signal to the line sensor, on the basis of the clock selection signal from the parallel output ports.
According to still another aspect of the present invention, there is provided an image processing system (7) according to the above (6), characterized in that:
the parallel output ports are assigned to the main central processing unit (CPU) including the image processing means,
the parallel input ports are assigned to the clock signal generating means, and
a clock rate pattern which corresponds to each of clock selection instruction signals of a plurality of bits, transmitted/received between the parallel output ports and the parallel input ports, is selected.
According to still another aspect of the present invention, there is provided an image processing system (8) according to the above (6), characterized in that:
the movement means includes a controller driven and controlled by the CPU;
the parallel output ports for transmitting the clock selection instruction signals of said plurality of bits, are assigned to the controller;
the parallel input ports for receiving the clock selection instruction signals of said plurality of bits, are assigned to the clock signal generating means; and
a clock rate pattern which corresponds to each of clock selection instruction signals of a plurality of bits, transmitted/received between the parallel output ports and the parallel input ports, is selected.
According to still another aspect of the present invention, there is provided an image processing system (9) according to any one of the above (6) to (8), characterized in that:
the clock selection instruction signal is sent to the parallel output ports of said plurality of bits from a predetermined number of transistors provided in the main CPU.
According to still another aspect of the present invention, there is provided an image processing system (10) according to the above (6), characterized in that:
a predetermined number of photo-couplers provided in the line sensor clock generator are connected to the parallel output ports of said plurality of bits, and
clock signals are supplied from the photo-couplers via respective amplifiers to the line sensor.